/**
 * Copyright (C) 2018-2019
 * All rights reserved, Designed By tennisport.cn
 * 注意：
 * 本软件为tennisport.cn开发研制，项目使用请保留此说明
 */
export const tableOption = {
    dialogType: 'drawer',
    border: true,
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    menuType: 'text',
    searchShow: false,
    dialogWidth: '88%',
    selection: true,
    searchMenuSpan: 6,
    column: [
        {
            label: '俱乐部名称',
            prop: 'cName',
            search: true,
            display: false
        },
        {
            label: 'LOGO路径',
            prop: 'logo',
            width: 120,
            slot: true,
            display: false
        },
        {
            label: '管理人员',
            prop: 'userName',
            display: false
        },
        {
          label: '所属城市',
          prop: 'city',
          slot: true,
          display: false
        },
        {
            label: '联系电话',
            prop: 'phone',
            display: false
        }
    ],
    group: [
      {
          icon: 'el-icon-view',
          label: '轮播图',
          prop: 'group0',
          column: [
            {
              label: '轮播图',
              prop: 'files',
              listType: 'picture-card',
              type: 'upload',
              limit:5,
              width: 250,
              headers:{},
              action: 'common/qiNiuUpload',
              loadText: '附件上传中，请稍等',
              fileSize:0.5,
              span: 24,
            //   props:{
            //       label:'fName',
            //       value:'path'
            //   },
              tip: '只能上传jpg/png文件，且不超过500kb',

               data: {fileName: ""},
            }]
      },
        {
            icon: 'el-icon-goods',
            label: '基本信息',
            prop: 'group1',
            column: [
                {
                    label: '名称',
                    prop: 'cName',
                    span: 18,
                    rules: [{
                        required: true,
                        message: '俱乐部名称不能为空',
                        trigger: 'blur'
                    },{
                      max: 100,
                      message: '长度在不能超过100个字符'
                    }]
                },
                 {
                    label: '管理员',
                    prop: 'userId',
                    type: 'select',
                    span: 9,
                    props: {
                        label: 'userName',
                        value: 'userId'
                    },
                    dicUrl: '/system/user/listByRoleKey?roleKey=club_admin'
                    // rules: [{
                    //     required: true,
                    //     message: '俱乐部管理人员不能为空',
                    //     trigger: 'blur'
                    // },{
                    //   max: 100,
                    //   message: '长度在不能超过100个字符'
                    // }]
                },
                 {
                    label: '联系电话',
                    prop: 'phone',
                    span: 9,
                    rules: [{
                        required: true,
                        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
                        message: "请输入正确的手机号码",
                        trigger: 'blur'
                    },{
                      max: 100,
                      message: '长度在不能超过100个字符'
                    }]
                },
              {
                label: 'logo',
                prop: 'logo',
                listType: 'picture-card',
                dataType: 'string',
                type: 'upload',
                limit:1,
                fileSize:0.1,
                width: 250,
                // canvasOption: {
                //   text: 'logo',
                //   ratio: 0.1
                // },
                headers:{},
                // oss: 'qiniu',
                action: 'common/qiNiuUpload',
                loadText: '附件上传中，请稍等',
                span: 24,
                tip: '只能上传jpg/png文件，且不超过100kb',
                 data: {fileName: ""},
              },

                // {
                //     label: '简单介绍',
                //     prop: 'content',
                //     type: 'textarea',
                //     minRows: 5,
                //     span:24,
                //     maxlength:1000,
                //     showWordLimit:true
                // },
                 {
                    label: '所属城市',
                    prop: 'city',
                    span: 9,
                    type: 'select',
                    // props: {
                    //     label: 'dictLabel',
                    //     value: 'dictValue'
                    // },
                    // dicUrl: '/system/dict/data/type/citys'
                    dicData:[{
                      label:'北京',
                      value:1
                    },{
                      label:'上海',
                      value:9
                    },{
                      label:'广州',
                      value:229
                    },{
                      label:'深圳',
                      value:231
                    },{
                      label:'天津',
                      value:2
                    }]
                    // rules: [{
                    //     required: true,
                    //     message: '所属城市不能为空',
                    //     trigger: 'blur'
                    // },{
                    //   max: 100,
                    //   message: '长度在不能超过100个字符'
                    // }]
                },
                 {
                    label: '地址',
                    prop: 'map',
                    type:'map',
                    tip:"请点击选择位置",
                    suffixIcon: 'el-icon-map-location',
                    span: 9,
                    formslot:true,
                    labelslot:true,
                    row:true,
                      params:{
                        zoom: 10,
                        // zoomEnable: false,
                        // dragEnable: false,
                    },
                    rules: [{
                        required: true,
                        message: '地址不能为空',
                        trigger: 'blur'
                    }]
                },
                {
                    label: '室内球场',
                    prop: 'indoor',
                    type: 'radio',value:0,
                    button:true,
                    span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '室外球场',
                    prop: 'outdoor',
                    type: 'radio',value:0,
                    span: 6,
                    button:true,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '穿线',
                    prop: 'threading',
                    type: 'radio',value:0,
                    button:true,span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '发球机',
                    prop: 'serve',
                    type: 'radio',value:0,
                    button:true,span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '停车场',
                    prop: 'park',
                    type: 'radio',value:0,
                    button:true,span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '休息区',
                    prop: 'rest',
                    type: 'radio',value:0,
                    button:true,span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                },
                {
                    label: '练习器',
                    prop: 'supply',
                    type: 'radio',value:0,
                    button:true,span: 6,
                    rules: [{
                        required: true,
                        message: '请选择是否有该设施',
                        trigger: 'blur'
                    }],
                    dicData: [{
                        label: '没有',
                        value: 0
                    }, {
                        label: '拥有',
                        value: 1
                    }]
                }]
        },
        {
            icon: 'el-icon-grape',
            label: '详细介绍',
            prop: 'group5',
            column: [
              {
                  label: '简单介绍',
                  prop: 'content',
                  formslot: true,
                  span: 18
              },
               {
                  label: '课程介绍',
                  prop: 'classDesc',
                  formslot: true,
                  span:18
              }]
        }
      ]
}
